package com.ruoyi.business.dbopt.utils;

import lombok.Data;
import lombok.ToString;

/**
 * @author stark
 */
@Data
@ToString
public class CommonException extends RuntimeException {

	private static final long serialVersionUID = 691206015631153493L;

	private String message;
	private String causeMessage;
	private Exception originException;

	public CommonException() {
		super();
	}


	public CommonException(String message, Exception exp) {
		super(message, exp);

		this.message = message;
		this.originException = exp;
		this.causeMessage = exp.getMessage();
    }

	public CommonException(String message) {
		this.message = message;
    }

	public CommonException(String message, Throwable cause) {
		super(message, cause);

		this.message = message;
		this.causeMessage = cause.getMessage();
    }
	
	public Exception getOrigin() {
		return originException;
	}
	


}
